﻿HmJS.$Import('util.dom.PrettyDate');
//HmJS.$Import('core.domready');

HmJS.register('demo.module.util.dom.prettydate', function ($ns) {
	var that = {};

	that.todo = function () {
		//apply `prettyDate` method to all elements "A" with class "pretty"
		$$('a.pretty').prettyDate();

		var options = {
			now: "a l'instant",
			minute: "il y a 1 minute",
			minutes: "il y a {x} minutes",
			hour: "il y a 1 heure",
			hours: "il y a {x} heures",
			yesterday: " hier",
			days: " il y a {x} jours",
			weeks: " il y a {x} semaines"
		};

		new $ns.util.dom.PrettyDate($$('a.pretty2'), options);
	};

	return that;
});
